package com.luobu.javaee.domain;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.data.elasticsearch.annotations.Setting;

@Document(indexName = "doc_search")
@Setting(replicas = 0)
@Data
public class DocumentSearch {
    //    @Field(type = FieldType.Keyword)
    @Id
    private Long docId;

    @Field(type = FieldType.Text, name = "docName", analyzer = "ik_max_word")
    private String docName;
    
    @Field(type = FieldType.Long, name = "userId")
    private Long userId;

    @Field(type = FieldType.Long, name = "archiveId")
    private Long archiveId;

}
